<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="Js/es6-promise.auto.min.js"></script>
		<script src="js/axios.min.js"></script>
		<script>
			function timePms(array){
				return new Promise(function(resolve) {
					setTimeout(function() {
						resolve(array.reduce(function(x,y){return x+','+y.name},"first"));
					}, 1000);
				});
			}
			function getPms() {
				return axios.get('testData.json')
				.then(function(rp) {
					console.log(rp.data);
					return rp.data;
				})
				.then(timePms);
			}

			function getPms2() {
				return getPms()
				.then(function(names) {
					console.log(names);
				});
			}
			getPms2();
		</script>
	</head>

	<body>

	</body>

</html>